/* ----------------------------------------------------------------------
 * File: 		lexer.h
 * Created by:		Taylor Wood
 * Email:		Tdwood2@asu.edu
 * Student ID:		1202553801
 *
 * Description:
 * Contains prototype definitions for lexer.cpp
 * ----------------------------------------------------------------------*/
#ifndef _LEXER_H
#define _LEXER_H

#include <iostream>
#include <string>
#include <locale>		// for isalpha function

// State definitions
enum stateDef {
	STATE_0,		// initial state
	STATE_DELIMITER,	// delimiter state
	STATE_OPERATOR,		// operator state
	STATE_INTEGER,		// integer state
	STATE_FLOAT,		// float state
	STATE_TOFLOAT,		// when a decimal is recieved
	STATE_UNKNOWN,		// who am I?
	STATE_TOCHAR,		// received a \'
	STATE_INCHAR,		// inside \' for a char
	STATE_CHAR,		// houston we have a char
	STATE_INCHARSA,		// this is presented when we have a '\''
	STATE_INSTR,		// in a string
	STATE_INSTRSA,		// recieved a \\ in a string
	STATE_STRING,		// its a string
	STATE_HEX,		// hexadecimal 
	STATE_INHEX,		// starting to hex
	STATE_OCTAL,		// octal
	STATE_DIGIT,		// digitttttttttttt
	STATE_ID,		// yeeeee
	STATE_INID,		// almost there.... its late
	STATE_KEYWORD		// we did it
};

bool isOperator(char);
bool isDelimiter(char);
std::string lexer(std::string);
void DFA(char);
std::string DFAStrRet(void);
void isKeyword(std::string);

#endif
